import json

import requests

url = 'https://httpbin.org/post'
payload = {
    'username': 'weixuesong',
    'password': 'wxs2011133069'
}
response = requests.post(url, data=payload)
print(response)
print(response.text)
print(response.request.headers)

response = requests.post(url, data=json.dumps(payload))
print(response)
print(response.text)
print(response.request.headers)

response = requests.post(url, json=payload)
print(response)
print(response.text)
print(response.request.headers)
